$(function(){
	
	//Tab切換JS_20140617
	function toggleEvent(curTrigger,trigger,curClass,usualClass,showContent,toggleSort){
		/*
		* "1"表示菜单切换,当前只显示showContent有且只有一个内容
		* "0"表示只要点击就show出来，再次点击就hide，可显示多个showContent内容
		* curTrigger:當前點擊對象
		* trigger:所有要點擊的對象
		* curClass:顯示當前狀態的class或 展开状态的class
		* usualClass:非當前狀態下的class或 隐藏状态的class
		* showContent:點擊當前對象對應要顯示的內容對象
		*/
		var curTab = $(trigger).index($(curTrigger));
		
		if(toggleSort == 1){			
			$(trigger).removeClass(curClass).addClass(usualClass);
			$(curTrigger).removeClass(usualClass).addClass(curClass);
			$(showContent).hide().eq(curTab).show();
			return;
		}
		if(toggleSort == 0){
			if($(showContent).eq(curTab).is(":visible")){
				$(curTrigger).removeClass(curClass).addClass(usualClass);
				$(showContent).eq(curTab).hide();
				return;
			}else{
				$(curTrigger).removeClass(usualClass).addClass(curClass);
				$(showContent).eq(curTab).show();
				return;
			}	
		}
	}
	//导航子菜单 标签切换 
	$(".tab li:not(.first)").hover(function(){
		$("#nav-tabCon").show("slow");
		toggleEvent(this,".tab li:not(.first)","active","",".tabCon",1);
	});
	$("#close-navCon").click(function(){
		$(".tabCon").hide("slow");
		$(this).hide();
	})
	//关于页面 标签切换  
	$(".subNav li").click(function(){
		toggleEvent(this,".subNav li","active","",".subNavCon",1);
	});
	
	$("#closewin").click(function(){
		if(confirm("您确定要关闭本页吗？")){
			window.opener = null;
			window.open('','_self');
			window.close();
		}
		else{}
	});
});